xen: Better handling on not-present PDEs in destroy_xen_mappings().
authorKeir Fraser <keir@xensource.com>
Sat, 12 May 2007 11:37:51 +0000 (12:37 +0100)
committerKeir Fraser <keir@xensource.com>
Sat, 12 May 2007 11:37:51 +0000 (12:37 +0100)
Signed-off-by: Keir Fraser <keir@xensource.com>
xen/arch/x86/mm.c

index 9c57c2e725f16c7c962d95b3858d8ad06198d700..dd942085c29a85e0e40ae604be3143a9a76bc221 100644 (file)
@@ -3503,7 +3503,8 @@ void destroy_xen_mappings(unsigned long s, unsigned long e)
 
         if ( !(l2e_get_flags(*pl2e) & _PAGE_PRESENT) )
         {
-            v += PAGE_SIZE;
+            v += 1UL << L2_PAGETABLE_SHIFT;
+            v &= ~((1UL << L2_PAGETABLE_SHIFT) - 1);
             continue;
         }